<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            margin-top: 20px;
        }

        input[value] {
            color: pink;
        }

        input[type='password'] {
            background-color: tomato;
        }

        div[class^='icon'] {
            color: red;
        }
        section[class$='data']{
            color: #ff6700;
        }
        /* 注意权重 */
        div.icon1{
            color: greenyellow;
        }
    </style>
</head>

<body>
    <div>
        <input type="text" value="请输入用户名">
        <input type="text"> <br>
    </div>
    <div>
        <input type="text" name="" id="">
        <input type="password" name="" id="">
    </div>
    <div class="icon1">icon1</div>
    <div class="icon2">icon2</div>
    <div class="icon3">icon3</div>
    <div>大大酱油</div>
    <section class="icon1-data">张三</section>
    <section class="icon1-data">李四</section>
    <section class="icon1-dat">3</section>
</body>

</html>